public class Test {

    public static void main(String[] args) {
        MySingleList mySingleList = new MySingleList();
//        mySingleList.creatList();

        mySingleList.addFirst(11);
        mySingleList.addFirst(23);
        mySingleList.addFirst(54);
        mySingleList.addFirst(84);
        mySingleList.addFirst(27);
        mySingleList.display();
//        System.out.println(mySingleList.size());
        mySingleList.addLast(64);
        mySingleList.addLast(72);
        mySingleList.addLast(95);
        mySingleList.display();
        System.out.println(mySingleList.size());

        mySingleList.addIndex(2,55);
        mySingleList.display();

//        System.out.println(mySingleList.contains(27));
//        System.out.println(mySingleList.contains(95));
//        System.out.println(mySingleList.contains(55));
//        System.out.println(mySingleList.contains(325));

        mySingleList.remove(95);
        mySingleList.display();

//        mySingleList.clear();
//        mySingleList.display();

//        mySingleList.reverse();
//        mySingleList.display();

//        System.out.println(mySingleList.middlenode());

        System.out.println(mySingleList.kthToLast(9).val);
    }
}
